package train_array.day2;

import java.util.Scanner;

public class code2 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();

        long l = k * n * (n + 1L) / 2L;
        System.out.println(l);
    }
}
